# delimit ;
set more off ;
capture log close ;
clear all ;

/* MASTER FILE FOR EPA WQ GRANT FINAL SP SURVEY DATA PROCESSING AND ANALYSIS */
/* AUTHOR: ROGER H. VON HAEFEN  */
/* LAST EDITED: NOVEMEBR 9, 2021 */



global impute_log       = "log\1-impute.log" ;                  /* IMPUTE LOG FILE */
global weights_log      = "log\2-weights.log" ;                 /* SAMPLING WEIGHTS LOG FILE */
global analysis_log     = "log\3-analysis.log" ;                /* ANALYSIS LOG FILE */
global case_study_log   = "log\4-case_study.log" ;              /* CASE STUDY LOG FILE */

global survey_data      = "data\streams_sp_data_final" ;        /* SURVEY DATA FOR ALL THREE COUNTIES */
global imputed_data     = "data\imputed_data" ;                 /* SURVEY DATA W/ MISSING VALUES IMPUTED */
global invited_sample   = "data\invited_sample" ;               /* 6-DIGIT CODES FOR 12,500 RESIDENTS INVITED TO PARTICIPATE IN SURVEY */
global returned_mail    = "data\returned_mail.xlsx" ;           /* SURVEY CODES FOR RETURNED/UNDELIVERED MAILINGS */
global weights_data     = "data\weights_final" ;                /* SAMPLING WEIGHTS FILE */
global estimation_data  = "data\estimation_data" ;              /* DATA REFORMATTED FOR STATA ESTIMATION */
global ee_data          = "data\ee_data" ;                      /* EXPERT ELICITATION DATA */
global scenarios_data   = "data\case_study_scenarios.xlsx" ;    /* WATER QUALITY POLICY SIMULATION FOR UPPER NUESE */

do do\1-impute ;      						/* IMPUTING MISSING DATA */
do do\2-weights ;       					/* CONSTRUCTING WEIGHTS */
do do\3-analysis ;      					/* CE ANALYSIS & EXPORT DATA TO GAUSS */
do do\4-case_study ;    					/* UPPER NEUSE CASE STUDY */
